home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / djgpp / libsrc / m / src / sinh.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-20  |  225 b   |  16 lines

  1. #include <math.h>
  2.  
  3. double sinh(double x)
  4. {
  5.  if(x >= 0.0)
  6.  {
  7.    const double epos = exp(x);
  8.    return (epos - 1.0/epos) / 2.0;
  9.  }
  10.  else
  11.  {
  12.    const double eneg = exp(-x);
  13.    return (1.0/eneg - eneg) / 2.0;
  14.  }
  15. }
  16.